package com.project.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.ProductBean;
import com.project.mapper.IProductMapper;
import com.project.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ProductServieImpl implements IProductService {
    @Autowired
    private IProductMapper mapper;

    public PageInfo<ProductBean> cutAll(int pageNO) {
        PageHelper.startPage(pageNO,PAGESIZE);
        PageInfo<ProductBean> pageInfo = PageInfo.of(mapper.cutAll());
        return pageInfo;
    }
}
